const {merge} = require('webpack-merge')
const common = require('./webpack.common.js')
const {SERVER_HOST, SERVER_PORT} = require('../constant.js')

module.exports = merge(common, {
	mode: 'development',
	stats: 'error-only',
	devtool: 'eval-source-map',
	devServer: {
		host: SERVER_HOST,
		port: SERVER_PORT,
		open: true,
		hot: true,
		// historyApiFallback: true,
		compress: true, // 是否启用 gzip 压缩
		client: {
			overlay: {
				errors: true,
				warnings: false
			}
		}
	}
})
